import axios from '../utils/http'

export const getCoupon = (uid)=>axios.get("/getcoupon?uid="+uid);


export const timestamp = (time) =>{
    let date = new Date(parseInt(time));

    let y  = date.getFullYear();
    let m = date.getMonth() + 1;
    let d = date.getDate();
    let h = date.getHours();
    let minute = date.getMinutes();
    let s = date.getSeconds();
    return `${y}年-${m}月-${d}日 ${h}:${minute}:${s}`
}